-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add plugin framework #919
feature: add plugin framework #919
Conversation
6d36758
to
75f71ce
Compare
Codecov Report
@@ Coverage Diff @@
## master #919 +/- ##
==========================================
- Coverage 13.59% 13.53% -0.07%
==========================================
Files 121 121
Lines 7706 7742 +36
==========================================
Hits 1048 1048
- Misses 6568 6604 +36
Partials 90 90
Continue to review full report at Codecov.
|
985cc42
to
e874dac
Compare
29a6dbb
to
97526d8
Compare
… plugin points like start and stop in life cyle of container and daemon
@yyb196 Thanks for your contribution. 🍻 |
@allencloud @rudyfly @HusterWan @Letty5411 please take a look at your earliest convenience, i'm eager to implement inner-company requirement via this plugin framework. |
Thanks a lot for your work. @yyb196 |
|
||
// ContainerPlugin defines in which place a plugin will be triggered in container lifecycle | ||
type ContainerPlugin interface { | ||
// PreCreate defines plugin point where recevives an container create request, in this plugin point user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/recevives/receives
if s.ContainerPlugin != nil { | ||
logrus.Infof("invoke container pre-create hook in plugin") | ||
if reader, ex = s.ContainerPlugin.PreCreate(req.Body); ex != nil { | ||
return errors.Wrapf(ex, "pre-create plugin piont execute failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/piont/point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these typo will be fixed in #929
Ⅰ. Describe what this PR did
which support executing custom code at plugin points like start and stop in life cyle of container and daemon
features:
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
@allencloud @rudyfly @wangforthinker @Letty5411 PTAL